$OpenBSD: patch-Makefile,v 1.8 2015/02/20 08:17:30 dcoppa Exp $
--- Makefile.orig	Thu Jan 15 19:58:20 2015
+++ Makefile	Tue Feb 10 21:14:38 2015
@@ -12,7 +12,10 @@ OBJS= src/$T.o
 lib: src/lfs.so
 
 src/lfs.so: $(OBJS)
-	MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/lfs.so $(OBJS)
+	MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) lfs.o -o $(LIBNAME)
+
+$(OBJS): $(SRCS)
+	$(CC) $(CFLAGS) $(INCS) -c src/lfs.c
 
 test: lib
 	LUA_CPATH=./src/?.so lua tests/test.lua
